﻿MindMapManager = {};

MindMapManager.Create = function () {
    var mindMap = new MindMap();

    mindMap.Id = Core.GetNewGuid();

    var rootNode = new MindMapNode();
    rootNode.Id = Core.GetNewGuid();
    rootNode.Text = "Root";
    rootNode.Position = { x: 0, y: 0, width: 100, height: 50 };

    rootNode.MindMap = mindMap;

    mindMap.Nodes.push(rootNode);

    return mindMap;
};


//connections.push(r.connection(shapes[0], shapes[1], "#fff"));
//connections.push(r.connection(shapes[1], shapes[2], "#fff", "#fff|5"));
//connections.push(r.connection(shapes[1], shapes[3], "#000", "#fff"));
//connections.push(r.connection(shapes[3], shapes[4], "#000", "#fff|5"));

//this.Load = function () {
//    $.ajax({
//        type: "POST",
//        url: 'WebMethods.aspx/GetMindMap',
//        data: "{'id': '1'}",
//        contentType: "application/json; charset=utf-8",
//        dataType: "json",
//        success: function (data) {
//            //Managers.OperationManager.OperationFinished(operationId);
//            //alert('success');
//            //debugger;



//            var data = $.parseJSON(data.d);
//        },
//        error: function (xhr, ajaxOptions, thrownError) {
//            alert('error');
//            debugger;
//            //Managers.OperationManager.OperationFinished(operationId);
//            //onSuccess(xhr.responseText);
//        }
//    });
//}

//this.Initialize = function () {

//}